﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="cartupdate.ascx.cs" Inherits="controls_client_cartupdate" %>
<table  border="1" cellpadding="0" cellspacing="0" align="center">
    <tr bgcolor="#00CC99">
        <td align="center">
            <b>THÔNG TIN KHÁCH HÀNG</b>
        </td>        
    </tr>
    <tr>
        <td>
            <b>Tên khách hàng :</b> <asp:Label ID="lbTen" runat="server" Text="Label"></asp:Label>
        </td>
    </tr>
    <tr>
        <td>
            <b>Địa chỉ :</b> <asp:Label ID="lbDiaChi" runat="server" Text="Label"></asp:Label>
        </td>
    </tr>
    <tr>
        <td>
            <b>Email :</b> <asp:Label ID="lbEmail" runat="server" Text="Label"></asp:Label>
        </td>
    </tr>
    <tr>
        <td>
            <b>Số điện thoại :</b> <asp:Label ID="lbSoDienThoai" runat="server" Text="Label"></asp:Label>
        </td>
    </tr>
    
</table>
<br />
<table border="1" cellpadding="0" cellspacing="0" align="center">
    <tr bgcolor="#99ccff">
        <td colspan ="5" align="center">
            CHI TIẾT HÓA ĐƠN
        </td>
    </tr>
    <tr bgcolor="#00CC99">
        <td align="center">
            Xóa</td>
        <td align="center">
            Tên sản phẩm</td>
        <td align="center">
            Số lượng</td>
        <td align="center">
            Đơn giá</td>
        <td align="center">
            Thành tiền</td>
    </tr>
<asp:Repeater ID="UpdateCart" runat="server">
    <ItemTemplate>    
    <tr>
        <td width="50px" align="center">
            <asp:CheckBox ID="remove" runat="server" />
        </td>
        <td width="250px">
            <asp:Label ID="id" runat="server" Text='<%#Eval("Id") %>' Visible="false" />      
            <%#DataBinder.Eval(Container.DataItem, "Name") %>
        </td>
        <td width="70px" align="center">
            <asp:TextBox ID="quantity" runat="server" Text='<%#Eval("Quantity") %>' Width="30" />
        </td>
        <td width="100px" align="right">
            <asp:Label ID="lbDonGia" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "Price", "{0:#,##0}") %>'></asp:Label> vnđ
        </td>
        <td width="150px" align="right">
            <%#(Convert.ToDouble(DataBinder.Eval(Container.DataItem, "Price")) * Convert.ToDouble(DataBinder.Eval(Container.DataItem, "Quantity"))).ToString("N0")%> vnđ
        </td>
    </tr>
    </ItemTemplate>
</asp:Repeater>
    <tr>
        <td align="right" colspan="4">
            &nbsp;
            &nbsp;
            <asp:Label ID="Label1" runat="server" Font-Bold="True" Text="Tổng tiền :"></asp:Label>
            &nbsp;&nbsp;
        </td>
        <td align="right">
            <asp:Label ID="sum" runat="server" Text="sum" Font-Bold="True" ForeColor="Red"></asp:Label> vnđ
        </td>
    </tr>
    <tr>
            <td colspan="5">
                Tổng thành tiền bằng chữ : <asp:Label ID="lbSumByText" runat="server" Text="Label"></asp:Label>
            </td>
    </tr>
    </table>
<table border="0" cellpadding="0" cellspacing="0" align="center" width="640">
        <tr>
            <td align="right">
            <asp:Button ID="btnUpdate" runat="server" onclick="btnUpdate_Click" 
                Text="Cập nhật" />
            </td>
            <td width="20"> &nbsp;</td>
            <td width="300"> 
            <asp:Button ID="btnBuy" runat="server" onclick="btnBuy_Click" 
                Text="Thanh toán" />
            </td>
        </tr>
</table>